1. Field of the Invention
The present invention relates to an image pickup apparatus, a method of controlling the same, and a storage medium, and more particularly to an image pickup apparatus configured to detect an object area in an image pickup screen and perform focus control based on a result of the detection.
2. Description of the Related Art
In the autofocus (AF) control of an image pickup apparatus, such as a video camera, a TV-AF method is predominant in which an AF evaluation value signal is generated that is indicative of the sharpness (contrast state) of a video signal generated using an image pickup element, and a focus lens position that is searched for that represents where the AF evaluation value signal assumes a maximum value.
Further, there has been known an image pickup apparatus having a human face detecting function so as to stably focus on a human object in the case of photographing a human being. For example, an image pickup apparatus has been proposed in which a focus detection area including a recognized face detection area is set and then focus detection is performed (see e.g. Japanese Patent Laid-Open Publication No. 2006-227080). Furthermore, there has been proposed an image pickup apparatus in which human eyes are detected, and focus detection is performed based on the detected human eyes (see e.g. Japanese Patent Laid-Open Publication No. 2001-215403).
The AF method includes an external ranging method (external phase difference detection method) in which a ranging sensor is provided separately from a photographic lens, and an in-focus position of a focus lens is calculated based on information indicative of an object distance detected by the ranging sensor. The focus lens is then moved to the calculated in-focus position.
In this external phase difference detection method, an optical flux received from an object is divided into two, and the divided optical flux components are received by a pair of light receiving element arrays (line sensors), respectively. Then, the amount of shift between images formed on the respective line sensors, i.e. a phase difference between the two images is detected, and an object distance is determined based on the phase difference using a triangulation technique. Then, the focus lens is moved to a position (in-focus position) where the object is focused at the object distance.
The AF method includes an internal (TTL) phase difference detection method.
In this internal phase difference detection method, an optical flux having passed through the emission pupil of a photographic lens is divided into two, and the divided optical flux components are received by a pair of focus detecting sensors, respectively. Then, the amount of deviation of focus of the photographic lens and the direction of the focus deviation are directly obtained by detecting the amount of shift between output images, i.e. the amount of relative positional shift in an optical flux-dividing direction, based on the respective amounts of received light, and the focus lens is moved based on the amount of deviation of the focus of the photographic lens and the direction of the focus deviation.
Further, a hybrid AF method as a combination of the internal phase difference detection method and the TV-AF method has also been proposed. In the hybrid AF method, a focus lens is moved close to an in-focus position using the internal phase difference detection method, and then the focus lens is more accurately moved to the in-focus position using the TV-AF method (see e.g. Japanese Patent Laid-Open Publication No. H05-064056 (paragraphs [0008] to [0009], FIG. 1, etc.)). There has been proposed another hybrid AF method in which the external phase difference detection method and the TV-AF method are combined (see e.g. Japanese Patent Laid-Open Publication No. 2005-234325 (paragraphs [0037] to [0062], FIG. 3, etc.)).
In the hybrid AF method proposed in Japanese Patent Laid-Open Publication No. 2005-234325, one of the TV-AF method and the external phase difference detection method is selected for focus control, depending on the amount of change in each signal in the TV-AF method and the external phase difference detection method.
By performing focus detection by combining the hybrid AF method and the face detecting function, an image pickup apparatus is capable of not only performing stable focusing on a main human object, but also performing high-speed focusing from a state in which an image blur is occurring.
However, when an object is moving or when a camera shake by a photographer has occurred, it is not always possible to obtain an in-focus position of a focus lens for the face detection area by the phase difference detection method. Even in a case where stable focusing is being performed after detection of a human face, it sometimes occurs that when the in-focus position of the focus lens for the face detection area temporarily cannot be obtained but an in-focus position of the focus lens for a background is obtained, the focus lens is moved to the in-focus position of the focus lens for the background based on judgment that the current position of the focus lens is not close to the in-focus position of the focus lens for the face detection area. This makes a photographer feel uncomfortable.
Further, when the external phase difference detection method is employed, an optical system different from the main optical system of the photographic lens is used, which causes a parallax. For this reason, a face detection area on the screen, where a human face is detected, can differ from a ranging area determined by the external phase difference detection method. In this case, even when the face of a main human object is detected and stable focusing is being performed, the in-focus position of the focus lens obtained by the external phase difference detection method sometimes corresponds to a background object. In this case, it is judged that image blur has occurred, and the background object is focused, which discomforts a photographer. Further, when the face detection area for the main human object and the ranging area determined by the external phase difference detection method overlap each other, high-speed focusing is performed on the main human object, which can cause unstable focusing.
Further, in the case where high-speed focusing is performed from a state in which the entire screen is blurred, the face detection area for the main human object and the ranging area determined by the external phase difference detection method does not always coincide with each other. Therefore, if the two areas do not coincide with each other, it sometimes occurs that the background is focused first, and then the main human object is focused, which makes it impossible to perform stable focusing at high speed.